package com.netease.spring_mybaties_demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.netease.spring_mybaties_demo.dao.DemoDao;
import com.netease.spring_mybaties_demo.pojo.Demo;

@RestController
public class DemoController {
	
	@Autowired
	DemoDao demoDao;
	
	@RequestMapping("/query")
	public Demo query(Demo demo){
		Demo demo1 = demoDao.queryById(demo);
		return demo1;
	}
}
